package com.o2o.cleaning.month.platform.ebusiness_plat.jumei_2019_7.Jumei_utils

import org.apache.spark.sql.DataFrame
import org.apache.spark.sql.functions.lit
//import platform.jumei.jumei_th1.JuMei

/**
  * @Description TODO
  * @Author liutaowei
  * @Date 2018/11/22 12:12
  */
object address_util {

    def is_self_data(data: DataFrame,timeStamp:String): DataFrame = {
      //所有地址全部打上聚美自营地址
      val data_003 = data
        .withColumn("address", lit("北京市朝阳区朝阳路71号7层829"))
        .withColumn("administrative_region", lit("华北地区"))
        .withColumn("city", lit("北京市"))
        .withColumn("city_grade", lit("1"))
        .withColumn("city_origin", lit("市辖区"))
        .withColumn("district", lit("朝阳区"))
        .withColumn("economic_division", lit("2"))
        .withColumn("district_origin", lit("朝阳区"))
        .withColumn("if_city", lit("0"))
        .withColumn("if_district", lit("2"))
        .withColumn("if_state_level_new_areas", lit("0"))
        .withColumn("kaifaqu", lit("0"))
        .withColumn("name", lit("北京创锐文化传媒有限公司"))
        .withColumn("poor_counties", lit("1"))
        .withColumn("province", lit("北京市"))
        .withColumn("regional_ID", lit("110105"))
        .withColumn("rural_demonstration_counties", lit("0"))
        .withColumn("rural_ecommerce", lit("0"))
        .withColumn("the_belt_and_road_city", lit("0"))
        .withColumn("the_yangtze_river_economic_zone_city", lit("0"))
        .withColumn("the_belt_and_road_province", lit("0"))
        .withColumn("the_yangtze_river_economic_zone_province", lit("0"))
        .withColumn("urban_agglomerations", lit("3"))
        .withColumn("timeStamp",lit(timeStamp))

      data_003

  }
}
